package edu.scsu.csci.validator;

import edu.scsu.csci.core.FrameWorkUncheckedException;


/**
 * Indicates that no concertor has been defined for the type.
 * 
 * @author Maqbool Khan
 * @since jdk 1.5
 * @see
 */
public class NoVaildatorDefinedException extends FrameWorkUncheckedException	{
	
	/**
     * class serialization id.
     */
    private static final long serialVersionUID = 9624563653476147L;
    
    /**
     * Defines which component has not be deinfed for validation to work.
     */
    public enum Undefined { VALIDATOR_ANNOTATION, VALIDATOR_CLASS, VALIDATOR_ANNOTATION_CLASS }
	
    private NoVaildatorDefinedException(String cause) {
    	super(cause);
    }
    
    /**
	 * @param exceptionMessage
	 */
	public NoVaildatorDefinedException(Undefined cause) {
		switch(cause){
			case VALIDATOR_ANNOTATION: 
				new NoVaildatorDefinedException("No validator annotaion has been defined.");
				break;
			case VALIDATOR_CLASS:
				new NoVaildatorDefinedException("No validator class has been defined.");
				break;
			case VALIDATOR_ANNOTATION_CLASS:
				new NoVaildatorDefinedException("Both the validator annotaion and class has not been deifned.");
				break;
		}
	}
}
